import React from "react";
import { MapStyle } from "./style";
import { PageTitle } from "../../../assets/global-style";

import {APILoader} from "@uiw/react-baidu-map"

import MapItem from './MapItem/index'

const goBack = () => {
  history.go(-1)
}

const Map = () => {
  return (
    <MapStyle>
       <div className="back" onClick={goBack}>
        <svg t="1641971935225" className="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2478" width="200" height="200"><path d="M738.145103 170.248828 663.234207 95.337931 313.114483 445.457655 312.937931 445.298759 238.768552 519.450483 238.945103 519.627034 238.768552 519.785931 313.679448 594.696828 313.838345 594.537931 658.996966 939.696552 733.166345 865.509517 388.007724 520.368552Z" p-id="2479" fill="#6F6F6F"></path></svg>
      </div>
      <PageTitle>定位&选择城市</PageTitle>
      <div className="search">
        <svg
          t="1642315292409"
          className="icon"
          viewBox="0 0 1024 1024"
          version="1.1"
          xmlns="http://www.w3.org/2000/svg"
          p-id="3029"
          width="200"
          height="200"
        >
          <path
            d="M1008.160651 931.256445l-177.567435-177.567436A464.412483 464.412483 0 1 0 639.131615 897.076798a57.521845 57.521845 0 1 0-43.071914-106.707191 350.758209 350.758209 0 1 1 118.100408-78.988332 10.976391 10.976391 0 0 0-0.83365 1.042063 6.530258 6.530258 0 0 1-0.83365 0.625237 54.465129 54.465129 0 0 0-5.696608 69.887653 58.286024 58.286024 0 0 0 7.850203 9.864857c1.042062 0.972592 2.223066 1.736771 3.3346 2.639892l212.719674 212.719674a54.604071 54.604071 0 0 0 76.904207 0 54.604071 54.604071 0 0 0 0.555766-76.904206z"
            p-id="3030"
            fill="#757575"
          ></path>
        </svg>
        <input placeholder="搜索城市" />
      </div>
      <APILoader akay="GTrnXa5hwXGwgQnTBG28SHBubErMKm3f">
        <MapItem />
      </APILoader>
    </MapStyle>
  );
};

export default Map;
